﻿@model IEnumerable<Beeldbankmvc.ViewModels.OrderViewModel>
@using Beeldbankmvc.Code           
@{
    ViewBag.Title = "Bestellingen overzicht";
    Layout = "../Shared/Layout.old.cshtml";
    Html.RenderAction("AdminMenu", "Miscellaneous");
}

<h2>@ViewBag.Title</h2>

<table>
    <tr>
        <th></th>
        <th>
            Besteld door
        </th>
        <th>
            TotaalPrijs
        </th>
        <th>
            OpdrachtNr
        </th>
        <th>
            Gebruik
        </th>
        <th>
            Opmerkingen
        </th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            <a href="@Url.Action("Details", "Order", new { id = item.Id })"> <img alt="Order bekijken" title="Order bekijken" src="@AppHelper.getContent("~/Content/images/view.gif")" /></a>
            <a href="@Url.Action("Delete", "Order", new { id = item.Id })"> <img alt="Order verwijderen" title="Order verwijderen" src="@AppHelper.getContent("~/Content/images/delete.gif")" /></a>
        </td>
        <td>
            @item.User
            op
            @String.Format("{0:g}", item.OrderDate)
        </td>
        <td>
            &euro;
            @String.Format("{0:F}", item.OrderPrice)
        </td>
        <td>
            @item.OrderNumber
        </td>
        <td>
            @item.Purpose
        </td>
        <td>
            @item.Comment
        </td>
    </tr>
}

</table>